<template>
  <a-steps progress-dot :current="currentStep">
    <a-step v-for="(step, index) in steps" :key="index" :title="step.title" />
  </a-steps>
</template>

<script setup>
import { defineProps } from 'vue'

const props = defineProps({
  // 当前步骤索引
  currentStep: {
    type: Number,
    default: 0,
    validator: (value) => value >= 0
  },
  // 步骤配置数组
  steps: {
    type: Array,
    required: true,
    validator: (value) => value.length > 0 && value.every(item => item.title)
  }
})
</script>
<style lang="scss" scoped>

</style>